fix(remote): let the image recipe survive a new base AMI - #140
Merged
Conversation
The recipe reads the "current" Ubuntu 24.04 SSM alias, so Canonical publishing a new image changes the parent between two deploys of unchanged code. Every recipe property is create-only, so that forces a replacement, which Image Builder then rejects for colliding with the recipe it is replacing — bootstrap fails on an account that was bootstrapped before the release. Name the recipe after its base AMI so the replacement lands. Also bump RUNNER_VERSION to 3.5.0: the outfit -> spinloop rename moved the baked daemon directory and the crash-nudge unit, which the boot script pins by their new names, so 3.4.0 AMIs need a rebake anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks
spinloop remote bootstrapon an account whose image stack predates the current Ubuntu release.Summary
RUNNER_VERSIONto 3.5.0 for both runners, so the components and recipes replace cleanly and the AMIs pick up the outfit -> spinloop rename.Implementation details
The recipe reads the
currentUbuntu 24.04 SSM alias, so Canonical publishing a new image changesparentImagebetween two deploys of otherwise unchanged code. Every recipe property is create-only, so that forces a replacement, and Image Builder rejects a create at a name and version that already exist — the replacement collides with the recipe it is replacing. Folding the AMI id into the name gives the replacement somewhere to land. The id is a deploy-time token, so it cannot be hashed at synth; putting it in the name is the only place it can be carried without a context lookup that would need the account in the stack's env.Changes we do control still rely on a
RUNNER_VERSIONbump, and one was owed: the outfit -> spinloop rename moved the baked daemon directory to/var/lib/spinloopand the crash-nudge unit tospinloop-nudge, both of whichlambda/runners/daemon-boot.tspins by their new names. A 3.4.0 AMI logrotates a path nothing writes to and has no timer for the boot script to enable, so those AMIs need a rebake regardless.